1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to encoding and decoding data, and more particularly, to a method and an apparatus for encoding and decoding data before and after performing entropy-encoding.
2. Description of the Related Art
Data transmission technologies have continued to develop. A data transmitting device encodes original data and transmits the encoded data, thus ensuring efficient data transmission.
Meanwhile, a data receiving device receives and decodes the encoded data to recover the original data.
If data is encoded prior to transmission, more data may be transmitted via a narrower bandwidth, and thus transmission efficiency is improved. In particular, data should be encoded prior to transmission when large amounts of data, such as image data are transferred.
An example of a data encoding method is the Huffman encoding method. The Huffman encoding method includes searching for coding values corresponding to input data in a Huffman table and outputting those coding values. In this method, coding values to which a small number of bits are allocated correspond to frequently occurring input data for efficient data encoding.